Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when you use a macro such as
{output_schort] or {cache.service.output_scshort}
and you don't have a line return in the string that is going to be transformed, the _scshort flag will return a nil a value. Therefore, the macro mecanism will say that the used macro is not a valid one and you will end up with the macro name in your event instead of the value.
how to test it:
create a format file such as
use a stream connector that is compatible with the custom format feature.
send an event with a long output (for example, storage mode of linux plugin with the verbose option,
without the patch
this must also be tested with plugin that returns a very simple output, such as the ping one
without the patch
with the patch